<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html lang="en-US">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>亚彦科技</title>
	<!--[if lt IE 9]>
		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<script src="Javascript/Flot/excanvas.js"></script>
	<![endif]-->
	<!-- The Fonts -->
	<!-- <link href="http://fonts.useso.com/css?family=Oswald|Droid+Sans:400,700" rel="stylesheet" /> -->
	<!-- The Main CSS File -->
	<link rel="stylesheet" href="<%=basePath %>CSS/style.css" />
	<link rel="icon" href="<%=basePath %>Images/logo.ico" type="image/x-icon"/> 
	<link rel="shortcut icon" href="<%=basePath %>Images/logo.ico" type="image/x-icon"/> 
	<!-- jQuery -->
	<script src="<%=basePath %>Javascript/jQuery/jquery-1.7.2.min.js"></script>
	<!-- Flot -->
	<script src="<%=basePath %>Javascript/Flot/jquery.flot.js"></script>
	<script src="<%=basePath %>Javascript/Flot/jquery.flot.resize.js"></script>
	<script src="<%=basePath %>Javascript/Flot/jquery.flot.pie.js"></script>
	<!-- DataTables -->
	<script src="<%=basePath %>Javascript/DataTables/jquery.dataTables.min.js"></script>
	<!-- ColResizable -->
	<script src="<%=basePath %>Javascript/ColResizable/colResizable-1.3.js"></script>
	<!-- jQuryUI -->
	<script src="<%=basePath %>Javascript/jQueryUI/jquery-ui-1.8.21.min.js"></script>
	<!-- Uniform -->
	<script src="<%=basePath %>Javascript/Uniform/jquery.uniform.js"></script>
	<!-- Tipsy -->
	<script src="<%=basePath %>Javascript/Tipsy/jquery.tipsy.js"></script>
	<!-- Elastic -->
	<script src="<%=basePath %>Javascript/Elastic/jquery.elastic.js"></script>
	<!-- ColorPicker -->
	<script src="<%=basePath %>Javascript/ColorPicker/colorpicker.js"></script>
	<!-- SuperTextarea -->
	<script src="<%=basePath %>Javascript/SuperTextarea/jquery.supertextarea.min.js"></script>
	<!-- UISpinner -->
	<script src="<%=basePath %>Javascript/UISpinner/ui.spinner.js"></script>
	<!-- MaskedInput -->
	<script src="<%=basePath %>Javascript/MaskedInput/jquery.maskedinput-1.3.js"></script>
	<!-- ClEditor -->
	<script src="<%=basePath %>Javascript/ClEditor/jquery.cleditor.js"></script>
	<!-- Full Calendar -->
	<script src="<%=basePath %>Javascript/FullCalendar/fullcalendar.js"></script>
	<!-- Color Box -->
	<script src="<%=basePath %>Javascript/ColorBox/jquery.colorbox.js"></script>
	<!-- Kanrisha Script -->
	<script src="<%=basePath %>Javascript/kanrisha.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
	<!-- Change Pattern -->
	<div class="changePattern">
		<span id="pattern1"></span>
		<span id="pattern2"></span>
		<span id="pattern3"></span>
		<span id="pattern4"></span>
		<span id="pattern5"></span>
		<span id="pattern6"></span>
	</div>
	<!-- Top Panel -->
	<div class="top_panel">
		<div class="wrapper">
			<div class="user">
				<img src="<%=basePath %>Images/user_avatar.png" alt="user_avatar" class="user_avatar" />
				<span class="label">${admin.op_username }</span>
				<!-- Top Tooltip -->
				<div class="top_tooltip">
					<div>
						<ul class="user_options">
							<li class="i_16_logout"><a href="<%=basePath %>back/adminLogout.do" title="注销"></a></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>

	<header class="main_header">
		<div class="wrapper">
			<div class="logo">
				<a href="#" title="亚彦科技">
					<img src="<%=basePath %>Images/kanrisha_logo.png" alt="kanrisha_logo" />
				</a>
			</div>
		</div>
	</header>

	<div class="wrapper contents_wrapper">
		
		<aside class="sidebar">
			<ul class="tab_nav">
				<li class="active_tab">
					<a href="<%=basePath %>back/getMatch.do" title="赛事管理">
						<span class="tab_label">赛事管理</span>
						<span class="tab_info">赛事查询、录入</span>
					</a>
				</li>
				<li class="">
					<a href="<%=basePath %>back/getIntegral.do" title="积分管理">
						<span class="tab_label">积分管理</span>
						<span class="tab_info">积分查询、修改</span>
					</a>
				</li>
				<li class="">
					<a href="<%=basePath %>back/getGrade.do" title="积分等级">
						<span class="tab_label">积分等级</span>
						<span class="tab_info">积分等级查询</span>
					</a>
				</li>
				<li class="">
					<a href="<%=basePath %>back/getNews.do" title="新闻资讯">
						<span class="tab_label">新闻资讯</span>
						<span class="tab_info">新闻资讯查询</span>
					</a>
				</li>
				<li class="">
					<a href="<%=basePath %>back/getBanner.do" title="广告管理">
						<span class="tab_label">广告管理</span>
						<span class="tab_info">广告录入、修改</span>
					</a>
				</li>
			</ul>
		
		</aside>

		<div class="contents">
			<div class="grid_wrapper">

				<div class="g_6 contents_header">
					<h3 class="i_16_table tab_label">赛事信息</h3>
					<div><span class="label">赛事查询、录入、修改</span></div>
				</div>
				<div class="g_6 contents_options">
					<div class="simple_buttons">
						<div class="bwIcon i_16_settings">功能</div>
						<div class="buttons_arrow">
							<!-- Drop Menu -->
							<ul class="drop_menu menu_with_icons right_direction">
								<li>
									<a class="i_16_add" href="<%=basePath %>back/addMatch.do" title="录入新赛事">
										<span class="label">录入新赛事</span>
									</a>
								</li>
							</ul>
						</div>
					</div>
				</div>

				<!-- Simple Table -->
				
				<!-- Separator -->
				<div class="g_12 separator"><span></span></div>
				<div class="g_12">
					<div class="widget_header wwOptions">
						<h4 class="widget_header_title wwIcon i_16_data">赛事查询</h4>
						<div style="text-align: center; color: red; font-size: 12px">${message }</div>
					</div>
					<div class="widget_contents noPadding">
						<table class="datatable tables">
							<thead>
								<tr>
									<th>开始时间</th>
									<th>赛事名称</th>
									<th>状态</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${list }" var="matchBean">
									<tr>
										<td>
											${matchBean.m_stardatetime }
										</td>
										<td>
											${matchBean.m_name }
										</td>
										<td>
											<c:if test="${matchBean.m_status == 0 }">
												报名中
											</c:if>
											<c:if test="${matchBean.m_status == 1 }">
												比赛中
											</c:if>
											<c:if test="${matchBean.m_status == 2 }">
												已结束
											</c:if>
										</td>
										<td>
											<input type="button" class="simple_buttons submitIt" value="编辑图片" onclick="javaScript:window.location.href='<%=basePath%>back/getMatchImg.do?matchId=${matchBean.m_id }'"/>
											<input type="button" class="simple_buttons submitIt" value="编辑回顾" onclick="javaScript:window.location.href='<%=basePath%>back/updateReview.do?matchId=${matchBean.m_id }'"/>
											<input type="button" class="simple_buttons submitIt" value="编辑内容" onclick="javaScript:window.location.href='<%=basePath%>back/updateMatch.do?matchId=${matchBean.m_id }'"/>
											<input type="button" class="simple_buttons submitIt" value="查看报名" onclick="javaScript:window.location.href='<%=basePath%>back/getEnter.do?matchId=${matchBean.m_id }'"/>
											<c:if test="${matchBean.m_status == 1 }">
												<input type="button" class="simple_buttons submitIt" value="抽奖" onclick="javaScript:window.window.open('<%=basePath%>back/getLuckDraw.do?matchId=${matchBean.m_id }')"/>
											</c:if>
										</td>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
			</div>		
		</div>
	</div>

	<footer>
		<div class="wrapper">
			<span class="copyright">
			</span>
		</div>
	</footer>
</body>
</html>